package com.example.demo.exception;

import com.example.demo.exception.AppExceptionCodeMsg;
import lombok.Getter;

/**
 *@Auter 李孝在
 *@Date 2025/1/17
 */

@Getter
public class AppException extends RuntimeException {
    private final Integer code;
    private final String msg;

    public AppException(AppExceptionCodeMsg appExceptionCodeMsg){
        super(appExceptionCodeMsg.getMsg());
        this.code=appExceptionCodeMsg.getCode();
        this.msg=appExceptionCodeMsg.getMsg();
    }

    public AppException(Integer code, String msg) {
        super(msg);
        this.code=code;
        this.msg=msg;
    }


}